import 'package:dio/dio.dart';
import 'package:vischat/core/service/network/api_endpoints/auth_endpoints.dart';
import 'package:vischat/core/service/network/api_service.dart';

class AuthRemote {
  final ApiService _apiService;

  AuthRemote(this._apiService);

  Future<Response> oneClickLogin(String token) async {
    final response = await _apiService.post(
      AuthEndpoints.oneClickLogin,
      data: {'token': token},
    );
    return response;
  }

  Future<Response> smsLogin(String token) async {
    final response = await _apiService.post(AuthEndpoints.smsLogin);
    return response;
  }

  Future<Response> fetchUser(int? userId) async {
    final response = await _apiService.post(
      AuthEndpoints.fetchUser,
      data: {'userId': userId},
    );
    return response;
  }
}
